_weaponClass = currentWeapon player;
_classM4A1 = ["M4A1","ACE_M4A1_F","ACE_M4A1_C","ACE_M4A1_GL","ACE_M4A1_GL_SD","ACE_M4A1_Aim_F","M4A1_Aim","ACE_M4A1_Aim_SD","ACE_M4A1_AIM_GL","ACE_M4A1_EOT_SD","ACE_M4A1_AIM_GL_SD","ACE_M4A1_Eotech","ACE_M4A1_HWS_GL_F","ACE_M4A1_ACOG","ACE_M4A1_ACOG_SD","M4A1_RCO_GL","ACE_M4A1_RCO2_GL","ACE_M4A1_ACOG_PVS14"];
_classM4SOC = ["ACE_SOC_M4A1","ACE_SOC_M4A1_GL","ACE_SOC_M4A1_SD_9","ACE_SOC_M4A1_GL_SD","ACE_SOC_M4A1_Aim","ACE_SOC_M4A1_AIM_SD","ACE_SOC_M4A1_GL_AIMPOINT","ACE_SOC_M4A1_EOT_SD","ACE_SOC_M4A1_Eotech","ACE_SOC_M4A1_Eotech_4x","ACE_SOC_M4A1_GL_EOTECH","ACE_SOC_M4A1_RCO_GL","ACE_SOC_M4A1_SHORTDOT","ACE_SOC_M4A1_SHORTDOT_SD"];
_classM16A4 = ["ACE_M16A4_Iron","M16A4_GL","m16a4","ACE_M16A4_CCO_GL","ACE_M16A4_EOT","ACE_M16A4_EOT_GL","m16a4_acg","M16A4_ACG_GL"];
_classM27 = ["ACE_M27_IAR","ACE_M27_IAR_CCO","ACE_M27_IAR_ACOG"];
_classMK16 = ["SCAR_L_CQC","SCAR_L_CQC_CCO_SD","SCAR_L_CQC_Holo","SCAR_L_STD_Mk4CQT","SCAR_L_CQC_EGLM_Holo","SCAR_L_STD_EGLM_RCO"];
_classHK416 = ["ACE_HK416_D10","ACE_HK416_D10_M320","ACE_HK416_D10_SD","ACE_HK416_D10_AIM","ACE_HK416_D10_COMPM3","ACE_HK416_D10_COMPM3_SD","ACE_HK416_D10_Holo"];
_classL85A2 = ["BAF_L85A2_RIS_ACOG","BAF_L85A2_RIS_Holo","BAF_L85A2_RIS_SUSAT","BAF_L85A2_UGL_ACOG","BAF_L85A2_UGL_Holo","BAF_L85A2_UGL_SUSAT"];
_classM249 = ["M249_EP1","ACE_M249_AIM","M249_m145_EP1","ACE_M249_PIP_ACOG"];
_classM240 = ["m240","ACE_M240B","m240_scoped_EP1"];
_classM9 = ["M9","M9SD"];
_classUSP = ["ACE_USP","ACE_USPSD"];

if(_weaponClass in _classM4A1) exitWith {createDialog "rmm_ui_classM4A1"};
if(_weaponClass in _classM4SOC) exitWith {createDialog "rmm_ui_classM4SOC"};
if(_weaponClass in _classM16A4) exitWith {createDialog "rmm_ui_classM16A4"};
if(_weaponClass in _classM27) exitWith {createDialog "rmm_ui_classM27"};
if(_weaponClass in _classMK16) exitWith {createDialog "rmm_ui_classMK16"};
if(_weaponClass in _classHK416) exitWith {createDialog "rmm_ui_classHK416"};
if(_weaponClass in _classL85A2) exitWith {createDialog "rmm_ui_classL85A2"};
if(_weaponClass in _classM249) exitWith {createDialog "rmm_ui_classM249"};
if(_weaponClass in _classM240) exitWith {createDialog "rmm_ui_classM240"};
if(_weaponClass in _classM9) exitWith {createDialog "rmm_ui_classM9"};
if(_weaponClass in _classUSP) exitWith {createDialog "rmm_ui_classUSP"};
if(true) exitWith {hint "NO ATTACHMENTS WERE FOUND FOR YOUR CURRENT WEAPON. TRY SWITCHING TO SEMI-AUTOMATIC AND TRY AGAIN."};